package com.yunpuvip.sachet.modular.core.exception;



public enum RestServiceExceptionEnum implements ServiceExceptionEnum {

    /**
     * 成功
     */
    SUCCESS(200,"SUCCESS"),
    /**
     * 失败
     */
    ERROR(500, "ERROR"),

    /**
     * 登录token异常, 700
     */
    TOKEN_EXPIRED(501, "授权过期或请求头无携带授权信息"),
    TOKEN_ERROR(501, "token验证失败"),
    SIGN_ERROR(502, "签名验证失败"),

    FILE_SUFFIX_ERROR(503, "文件格式不对"),
    FILE_UPLOAD_ERROR(504, "文件上传出错"),
    PARAMETER_VALUE_EMPTY(505, "参数为空"),
    PLAYER_NOT_FOUND(506, "token验证错误，无用户信息"),




    PLAYER_STATUS_ABNORMAL(509, "用户状态异常，可能无效用户或账户已被冻结"),
    ORDER_NOT_EXIST(511, "订单不存在"),
    ORDER_STATUS_NOT_WAIT_PAY(512, "订单不为待支付状态"),
    ORDER_ERROR(513, "订单数据异常"),
    ORDER_TIMEOUT(514, "订单超时"),
    ORDER_IS_NOT_SHIPPED(515, "订单不为发货状态"),
    ORDER_CANT_CANCEL(516, " 订单无法取消"),
    GOODS_HAVE_NO_SKU(517, "此商品无规格"),


    PHONE_REGISTERED(518, "此手机号已被注册!"),
    PHONE_BE_SEND(519, "验证码已经发送，请稍后在重试"),
    PHONE_CODE_MAXIMUM_NUMBER_OF_TIMES(520, "此手机号今日已达到验证码发送上限，请6小时之后再尝试！"),
    PHONE_REPEAT_BINDING(521, "此账户已绑定手机号码，请勿重复绑定！"),
    PHONE_NOT_SEND_OR_EXPIRED(522, "验证码不存在或已过期！"),
    PHONE_CODE_NOT_MISMATCH(523, "验证码不匹配！"),

    PAY_RESULT_DATA_ERROR(1001, "支付返回数据错误"),
    PAY_RESULT_SIGNATURE_VERIFICATION_ERROR(1002, "支付返回数据签名验证失败"),

    TRXSTATUS_NOT_EXIST(1003, "交易状态不存在"),
    TRXSTATUS_UNKNOWN(1004, "未知交易状态"),
    PAY_ERROR(1005, "支付异常"),
    PAY_ERROR_INSUFFICIENT_POINTS(1006, "支付异常,可能原因为积分不足以抵扣，请检查剩余积分数量"),
    SCORE_CANT_DEDUCTION(1007, "积分不足，无法进行抵扣"),
    ORDER_OVER_TRADING_LIMIT_ERROR(1008, "当前订单总金额已超过交易限制额度，无法进行支付"),

    SMS_ERROR(500,"短信业务异常")

    ;


    private  int code;


    private   String message;

    RestServiceExceptionEnum(int code, String message){
        this.code=code;
        this.message=message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "RestServiceExceptionEnum{" +
                "code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
